#pragma once

#include <cuda.h>
#include <cuda_runtime.h>
#include <vector>

#include <algorithm/analytical_model/algorithm/cuda/inter_op/Data.h>

namespace solar::cuda
{
    class RectangleHeliostat;
    class Grid
    {
        public:
            __device__ __host__ Grid() = default;
            virtual auto gridHelioMatch(const std::vector<RectangleHeliostat*>& heliostats)
                -> int = 0;
            virtual void init() = 0;
            virtual void clear() = 0;

            inter_op::GridType type_; // RectangleGrid : 0  ... ...
            float3 pos_{};
            float3 size_{};
            float3 interval_{};
            int helio_type_{};
            int start_helio_index_{}; // The first heliostat index of the heliostat lists in this
                                      // grid
            int num_helios_{};        // The number of heliostats in this grid
            int belonging_receiver_index_{};
    };
} // namespace solar::cuda
